﻿#region Using

using System.Runtime.Serialization;

using GameLogic.External;

#endregion

namespace CommunicationLibrary.TransportData
{
    [DataContract(Name = "C", IsReference = true)]
    public class Player
    {
        public Player(IPlayer player)
        {
            this.GoldAmount = player.GoldAmount;
            this.Name = player.Name;
            this.ResearchPoints = player.ResearchPoints;
            this.Identifier = player.Identifier;
        }

        [DataMember(Name = "A")]
        public int Identifier { get; private set; }

        [DataMember(Name = "B")]
        public int GoldAmount { get; private set; }

        [DataMember(Name = "C")]
        public string Name { get; private set; }

        [DataMember(Name = "D")]
        public int ResearchPoints { get; private set; }
    }
}